package cn.guet.spider.elong;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import cn.guet.spider.elong.task.LongTask;

/**
 * @author SAGITTAR
 */
@SpringBootApplication
public class LongApplication implements CommandLineRunner {

    @Autowired
    @Qualifier(value = "longTask")
    private LongTask longTask;

    @Override
    public void run(String... args) throws Exception {
        longTask.execute();
    }

    public static void main(String[] args) {
        SpringApplication.run(LongApplication.class, args);
    }
}
